package org.nf.shopping.mapper;

import org.apache.ibatis.annotations.Param;
import org.nf.shopping.entity.Admin;
import org.nf.shopping.entity.Role;

import java.util.List;

/**
 * @Author czl
 * @Date 2024-11-27
 */
public interface RoleMapper {
    /**
     * 查询全部
     * @return
     */

    List<Role> listRole(@Param("pageSize") Integer pageSize,
                          @Param("pageNum") Integer pageNum,
                          @Param("roleName") String roleName,
                          @Param("roleType") String roleType);


    Role getRole(@Param("role") Role role);

    String selectRolePwd (@Param("rolePassword") String rolePwd,@Param("roleName")String roleName);

    void updateRolePwd(@Param("rolePassword")String newPwd,@Param("roleName")String roleName);

    List<Role> listRoles(@Param("pageSize") Integer pageSize,@Param("pageNum") Integer pageNum,@Param("name") String name);

    void updateRole(Role role);

    void deloneRole(Integer id);

    void addRole(Role role);

    List<Role> getRoleList();
}
